<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="../common.jsp"%>
<%@ page import="org.springside.core.Constants"%>
<%@ page import="java.sql.*,javax.sql.DataSource"%> 
<%@ page import="cn.firstsoft.firstframe.admin.*"%> 
<%@ page import="javax.naming.*,javax.naming.directory.*"%> 
<%

String id = request.getParameter("moduleID")==null?"":request.getParameter("moduleID");
String value = request.getParameter("statusValue")==null?"":request.getParameter("statusValue");
try{
Context   ctx   =   new   InitialContext();   
DataSource   ds   =   (DataSource)   ctx.lookup(PropertyFile.readValue("jdbc.properties","jndi.default_name"));   

Connection conn=  ds.getConnection(); 

Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);   
String sql="update system_modules set isdisplay = '"+value+"' where id = '"+id+"'";   

stmt.execute(sql);
stmt.close();
conn.close();
} catch(Exception e){
  out.println(e);
}
response.sendRedirect("module.jsp");
%>